import gradio as gr

#对应inputs
def greet(name,sex="女",age=0,jj=0):

    salutation="恶臭男" if sex==['男'] else "下头女"

    res=f"你好,{'鸡鸡'+str(jj-5)+'厘米' if sex==['男'] else str(age+5)+'高寿'}的{salutation}':'{name}"

    #返回值对应 outputs的列表
    return res

demo=gr.Interface(
    fn=greet,
    inputs=[gr.Text(label="姓名",placeholder="在这里输入你的大名"),
            gr.CheckboxGroup (label="性别",choices=['男','女']),
            gr.Slider(30,100,label="年龄",step=1),
            gr.Slider(30,100,label="长度")],
    outputs=["text"]
)

demo.launch(share=True)